import csv
# 案例：写入
# user_feild = ['username', 'password']
# user1 = ['test01', '123456']
# user2 = ['test02', '123456']
# user3 = ['test03', '123456']
# user_list = [user_feild, user1, user2, user3]
#
# with open(r'username.csv', mode='w', newline='') as f:
#     f_csv_writer = csv.writer(f)
#     f_csv_writer.writerows(user_list)

def get_csv_data(path):
    with open(path) as f:
        f_csv_reader = csv.reader(f)
        next(f_csv_reader)
        outcome = list(f_csv_reader)
        return outcome
if __name__ == '__main__':
    print(get_csv_data(fr'C:\Users\admin\Desktop\trainingcamp\python_230901\homework\zhaozhixia\课堂练习\12-26\username.csv'))
